<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html
	class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg no-smil svgclippaths">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>XToolsCRM - easy to Power</title>

<link
	href="http://cdn.xtcrm.com/cdn//v7/pl/bootstrap-datepicker/css/bootstrap-datepicker3.min.css"
	rel="stylesheet">
<link
	href="http://cdn.xtcrm.com/cdn//v7/pl//switchery/switchery.min.css"
	rel="stylesheet">
<link
	href="http://cdn.xtcrm.com/cdn//v7/pl/clockpicker/bootstrap-clockpicker.min.css"
	rel="stylesheet">
<link
	href="http://cdn.xtcrm.com/cdn//v7/pl/bootstrap-table/bootstrap-table.min.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/fm/bs/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<link
	href="http://cdn.xtcrm.com/cdn//v7/pl/bootstrap-select/css/bootstrap-select.min.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/core.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/components.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/icons.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/pages.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/responsive.css"
	rel="stylesheet" type="text/css">
<link
	href="http://cdn.xtcrm.com/cdn//v7/pl/sweetalert/sweetalert.min.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/pl/custombox/custombox.min.css"
	rel="stylesheet">
<link href="http://cdn.xtcrm.com/cdn//v7/pl/animate/animate.min.css"
	rel="stylesheet" type="text/css">
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/css.css"
	rel="stylesheet" type="text/css">
<script src="http://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet"
	href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="../js/axios.js"></script>
<script type="text/javascript" src="../js/qs.js"></script>

<link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">

<style>
.dd {
	margin: 0;
	padding: 0;
}
</style>

</head>

<body class="fixed-left modal-open" onload=";">

	<div class="createOrderbox"
		style="width: 800px; height: 584px; margin: 0 auto;"
		id="createOrderbox">

		<div id="popshowcont">
			<div id="gedit">
				<div id="editgedit"
					style="position: absolute; display: none; &amp;#9; left: 0; &amp;#9; top: 0; width: 0; &amp;#9; height: 0; z-index: 100; background-color: #D4D0C8;">
					<iframe name="editsubgedit" src="/a.html" scrolling="no"
						style="width: 0; height: 0; border: 0;"></iframe>
				</div>
				<form name="formedit_gedit" class="form-horizontal"
					action="/system/editok.xt" enctype="multipart/form-data"
					method="POST" target="editsubgedit" novalidate=""
					autocomplete="off">
					<input name="mdb" type="hidden"
						value="0c5a3e8915871b710c2cc98073748424"><input
						name="comname" type="hidden" value="gedit"><input
						name="db" type="hidden" value="libin"><input
						name="retjava" type="hidden"
						value="b7gsTKoUGZph2X0lGZld2Xkx2biVnLw9GdgsTKoUGdhRGc1JGZu92XrNWasN2X0lGZldmLw9Gd"><input
						name="type" type="hidden" value="insert"><input
						name="dt_libin_id" type="hidden" value=""><input
						name="dt_libin_bl_flag" type="hidden" value="">
					<div class="portlet form-horizontal border-n">
						<div class="portlet-heading portlet-default">
							<div class="pull-right  f-s-12">

								<!--<span class="button_close_qshow"><button type="button" class="btn btn-white waves-effect waves-light" data-dismiss="modal" aria-hidden="true"><i class="fa fa-close m-r-5"></i>关闭</button></span>-->
								<div class="btn-save">
									<input name="B0"
										class=" m-l-5 btn btn-white  waves-effect waves-light"
										style="padding-left: 30px" @click="submitForm('ruleForm')"
										type="submit" value="保存" set-lan="value:保存">
								</div>
							</div>
							<h4 class="modal-title text-dark">
								<span set-lan="html:入库单">入库单</span>

							</h4>
							<hr class="border-t-a">

						</div>
						<div class="gedit_scroll_content">

							<el-form :model="ruleForm" :rules="rules" ref="ruleForm"
								class="demo-ruleForm"> <el-row :gutter="20">
							<el-col :span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">主题:</div>
							</el-col> <el-col :span="16"> <el-form-item prop="titles">
							<el-input v-model="ruleForm.titles" :span="16"
								placeholder="请输入内容"></el-input> </el-form-item> </el-col> </el-row> <!--仓库、填单时间--> <el-row
								:gutter="20"> <!--仓库--> <el-col :span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">仓库:</div>
							</el-col> <!--仓库--> <el-col :span="6" class="dd"> <el-form-item
								prop="deport"> <el-select
								v-model="ruleForm.deport" placeholder="请选择"
								style="width: 220px;"> <el-option
								v-for="item in ruleForm.customertoman" :key="item.dgsnum"
								:label="item.dgsname" :value="item.dgsnum"> </el-option> </el-select> </el-form-item> </el-col> <!--仓库-->

							<!--填单时间--> <el-col :span="3">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">填单时间:</div>
							</el-col> <!--填单时间--> <el-col :span="7" class="dd"> <!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
							<el-form-item prop="havetime"> <el-date-picker
								v-model="ruleForm.havetime" type="date" placeholder="选择日期"
								:picker-options="pickerOptions0"> </el-date-picker> </el-form-item> </el-col> <!--填单时间-->

							</el-row> <!--状态、填单人--> <el-row :gutter="20"> <!--状态--> <el-col
								:span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">状态:</div>
							</el-col> <!--状态--> <el-col :span="6" class="dd"> <el-input
								v-model="ruleForm.types" :span="16" disabled
								style="width: 220px;"></el-input> </el-col> <!--状态--> <!--填单人--> <el-col
								:span="3">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">填单人:</div>
							</el-col> <!--填单人--> <el-col :span="7" class="dd"> <!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
							<el-input v-model="ruleForm.domans" :span="16" disabled></el-input>
							</el-col> <!--填单人--> </el-row> </br>
							<!--库管确认、执行时间--> <el-row :gutter="20"> <!--库管确认--> <el-col
								:span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">库管确认:</div>
							</el-col> <el-col :span="6" class="dd"> <el-input
								v-model="ruleForm.yesman" :span="16" disabled
								style="width: 220px;"></el-input> </el-col> <!--库管确认--> <!--执行时间--> <el-col
								:span="3">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">执行时间:</div>
							</el-col> <!--执行时间--> <el-col :span="7" class="dd"> <!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
							<el-input v-model="ruleForm.dodate" :span="16" disabled></el-input>
							</el-col> <!--填单人--> </el-row> </br>
							<!--对应采购单、对应退货单--> <el-row :gutter="20"> <!--对应采购单--> <el-col
								:span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">对应采购单:</div>
							</el-col> <el-col :span="6" class="dd"> <el-input
								v-model="ruleForm.orders" :span="16" disabled
								style="width: 220px;"></el-input> </el-col> <!--对应采购单--> <!--对应退货单--> <el-col
								:span="3">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">退货单:</div>
							</el-col> <!--对应退货单--> <el-col :span="7" class="dd"> <!--<el-input v-model="orderid" :span="16" placeholder="请输入内容"></el-input>-->
							<el-input v-model="ruleForm.retorder" :span="16" disabled></el-input>
							</el-col> <!--对应退货单--> </el-row> </br>

							<el-row :gutter="20"> <el-col :span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">对应供应商:</div>
							</el-col> <el-col :span="16"> <el-input
								v-model="ruleForm.suppliers" :span="16" disabled></el-input> </el-col> </el-row> </br>
							<el-row :gutter="20"> <el-col :span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">备注:</div>
							</el-col> <el-col :span="16"> <el-input type="textarea"
								:autosize="{ minRows: 4, maxRows: 5}" placeholder="请输入内容"
								v-model="ruleForm.descins" maxlength="200"> </el-input> </el-col> </el-row> </br>
							<el-row :gutter="20"> <el-col :span="4">
							<div
								style="vertical-align: middle; margin-bottom: 0; text-align: right; line-height: 40px; height: 40px;">入库明细:</div>
							</el-col> <el-col :span="16"> <el-input
								v-model="ruleForm.indetails" :span="16" disabled
								placeholder="保存后方可编辑明细"></el-input> </el-col> </el-row> </el-form>
						</div>
						<div class="text-right p-20">

							<!--<span class="button_close_qshow"><button type="button" class="btn btn-white waves-effect waves-light" data-dismiss="modal" aria-hidden="true"><i class="fa fa-close m-r-5"></i>关闭</button></span>-->
							<div class="btn-save">
								<input name="B0"
									class=" m-l-5 btn btn-white  waves-effect waves-light"
									style="padding-left: 30px" @click="submitForm('ruleForm')"
									type="submit" value="保存" set-lan="value:保存">
							</div>
						</div>
					</div>

				</form>
			</div>
		</div>
	</div>

	</div>

	<script type="text/javascript">
			var vm = new Vue({
				el: ".createOrderbox",
				data: {
					pickerOptions0: {
				          disabledDate(time) {
				            return time.getTime() < Date.now() - 8.64e7;
				          }
				        }, 
					ruleForm: {
						/*主题*/
						titles: "",
						/*仓库*/
						deport: "",
						customertoman: [],
						/*填单日期*/
						havetime: "",
						/*状态*/
						types: "",
						/*填单人*/
						domans: "",
						/*库管确认*/
						yesman: "",
						/*执行时间*/
						dodate: "",
						/*对应采购单*/
						orders: "",
						/*对应退货单*/
						retorder: "",
						/*对应供应商*/
						suppliers: "",
						/*备注*/
						descins: "",
						/*入库明细*/
						indetails: ""
					},
					rules: {
						//数据源model
						titles: [
							//非空验证
							{
								required: true,
								message: '请输入获客主题',
								trigger: 'blur'
							},
							//长度验证
							{
								min: 3,
								max: 15,
								message: '长度在 3 到 15 个字符',
								trigger: 'blur'
							}
						],
						deport: [{
							required: true,
							message: '请选择仓库',
							trigger: 'change'
						}],
						havetime: [
							//数据类型要是date
							{
								type: 'date',
								required: true,
								message: '请选择日期',
								trigger: 'change'
							}
						]
					}

				},
				methods: {
					submitForm(formName) {
		            	var fils = this;
						//验证方法
						this.$refs[formName].validate((valid) => {
							if(valid) {
								//post提交数据
								axios.post("/addinstockes",
									//参数转换
									Qs.stringify(this.ruleForm, {
										arrayFormat: 'brackets'
									})
									
								).then(function(v) {
									//fils.dd();
									//alert(v.data.addinstok);
									window.parent.location.href="/instockesnew?fils="+v.data.addinstok;
								}).catch(function(e) {
									alert("出错了"+e);
								});

							} else {
								console.log('error submit!!');
								return false;
							}
						});
					}
				},mounted() {
					var sheslfse=${shelfs};
					this.ruleForm.customertoman=sheslfse;
					console.log(this.ruleForm.customertoman);
				}

			});
		</script>


	<script src="js/jquery.min.js?v=2.1.4"></script>
	<script src="js/bootstrap.min.js?v=3.3.6"></script>



	<!-- 自定义js -->
	<script src="js/content.js?v=1.0.0"></script>


	<!-- Toastr script -->
	<script src="js/plugins/toastr/toastr.min.js"></script>



</body>
<!--UTF8-->

</html>